package Student1;

import java.util.Scanner;
import java.util.TreeSet;

public class StudentScoreText {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        TreeSet<StudentScore> studentScores = new TreeSet<>();
        for (int i = 0; i < 5; i++) {
            System.out.println("姓名-语文-英语-数学");
            String line= scanner.nextLine();
            String[]split=line.split("-");
            Integer chinese=Integer.valueOf(split[1]);
            Integer english=Integer.valueOf(split[2]);
            Integer math=Integer.valueOf(split[3]);
            StudentScore studentScore = new StudentScore(split[0],chinese,english,
                    math,chinese+english+ math);
            studentScores.add(studentScore);
        }
        System.out.println("studentScores = " + studentScores);
    }
}
